// pages/index/index.scss
.pageContainer {
  background-color: #f7f7f7;
  height: 100vh; // 设置固定高度
  display: flex;
  flex-direction: column; // 改为列布局
  // 正确设置 NutUI 组件变量
  --nutui-grid-item-content-bg-color: #ffffff;
  --nutui-grid-item-content-padding: 20px 0;
  --nutui-grid-border-color: #f0f0f0;
  .sec{
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; // 重要：防止外部滚动
    .loading{
      flex: 1;
      display: flex;
    }
    .search-bar, .total {
      flex-shrink: 0; // 防止搜索区域被压缩
    }

    // 新增滚动容器样式
    .scroll-container {
      flex: 1;
      overflow: hidden;
      position: relative;

      .loading {
        height: 100%;
        overflow-y: auto; // 允许垂直滚动

        .user-list {
          min-height: 100%;

          .order-list {
            padding: 16px;
            box-sizing: border-box;
          }
        }
      }
    }
    .search-bar {
      display: flex;
      align-items: center;
      padding: 20rpx 32rpx;
      background-color: #fff;

      .search-input {
        flex: 1;
        background-color: #f5f5f5;
        border-radius: 50rpx;
        padding: 0 20rpx;
        height: 72rpx;
        font-size: 28rpx;
        border: none;
      }

      .nut-input__input {
        background-color: transparent !important;
      }

      .search-btn {
        margin-left: 20rpx;
        height: 72rpx;
        line-height: 72rpx;
        border-radius: 50rpx;
        background-color: #E43D33; // 金钱红
        color: #fff;
        font-size: 28rpx;
        font-weight: 600;
      }
    }

    .total{
      background-color: #fff;
      font-size: 26rpx;
      font-weight: 600;
      font-style: normal;
      color: $primaryBackground;
      padding-left: 32rpx;
      padding-top: 12rpx;
    }

    .order-list {
      padding: 16px;
      min-height: 100%;
      box-sizing: border-box;
    }

    .order-item {
      background: #ffffff;
      border-radius: 16rpx;
      padding: 24rpx;
      margin-bottom: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      display: flex;
      align-items: flex-start; // 改为顶部对齐

      &:last-child {
        margin-bottom: 0;
      }
    }

    .order-image {
      width: 220rpx;
      height: 220rpx;
      border-radius: 16rpx;
      margin-right: 24rpx;
      flex-shrink: 0;
    }

    .order-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      position: relative; // 添加相对定位
      height: 220rpx; // 与图片高度一致

      .order-service {
        font-size: 36rpx;
        font-weight: 600;
        color: #111111;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 12rpx;
        text-shadow: 0 8rpx 4rpx rgba(0, 0, 0, 0.1); // 添加文字阴影
      }

      .order-details {
        display: flex;
        align-items: center;

        .order-amount-label {
          font-size: 28rpx;
          color: #999999;
        }

        .order-amount {
          font-size: 34rpx;
          font-weight: 600;
          color: #ff4d4f;
        }
      }

      .order-no {
        font-size: 28rpx;
        color: #999999;
      }

      .order-date {
        font-size: 28rpx;
        color: #333333;
        font-weight: 600;
        position: absolute; // 绝对定位
        bottom: 0; // 底部对齐
        right: 0; // 右侧对齐
      }
    }

    .no-more-data {
      text-align: center;
      padding: 16px 16px;

      .no-more-text {
        font-size: 28rpx;
        color: #cccccc;
      }
    }

  }

}

.order-header {
  flex-shrink: 0; // 头部不收缩
}
